package br.com.linkcom.sined.geral.service;

import br.com.linkcom.neo.core.standard.Neo;
import br.com.linkcom.sined.geral.bean.Tela;
import br.com.linkcom.sined.geral.dao.TelaDAO;
import br.com.linkcom.sined.util.neo.persistence.GenericService;


public class TelaService extends GenericService<Tela> {
	
	private TelaDAO telaDAO;
	
	public void setTelaDAO(TelaDAO telaDAO) {
		this.telaDAO = telaDAO;
	}
	
	public String getTelaDescriptionByUrl(String url) {
		return telaDAO.getTelaDescriptionByUrl(url);
	}
	
	public void clearTelaCache(){
		telaDAO.clearTelaCache();
	}
	
	/* singleton */
	private static TelaService instance;
	public static TelaService getInstance() {
		if(instance == null){
			instance = Neo.getObject(TelaService.class);
		}
		return instance;
	}
}
